package com.ygqh.baby.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.ygqh.baby.ao.QueryInfo;
import com.ygqh.baby.model.PrizeItem;
import com.ygqh.baby.model.PrizeItem.Type;
import com.ygqh.baby.model.UserPrizeItem;
import com.ygqh.baby.po.YgUserPrize;
import com.ygqh.baby.po.YgUserPrizeExample;

public interface YgUserPrizeMapper {
	int countByExample(YgUserPrizeExample example);

	int deleteByExample(YgUserPrizeExample example);

	int deleteByPrimaryKey(Long id);

	int insert(YgUserPrize record);

	int insertSelective(YgUserPrize record);

	List<YgUserPrize> selectByExample(YgUserPrizeExample example);

	YgUserPrize selectByPrimaryKey(Long id);

	int updateByExampleSelective(@Param("record") YgUserPrize record, @Param("example") YgUserPrizeExample example);

	int updateByExample(@Param("record") YgUserPrize record, @Param("example") YgUserPrizeExample example);

	int updateByPrimaryKeySelective(YgUserPrize record);

	int updateByPrimaryKey(YgUserPrize record);

	int countSuper(@Param("q") String q);

	List<YgUserPrize> selectSuper(@Param("queryInfo") QueryInfo queryInfo, @Param("q") String q);

	List<YgUserPrize> selectPrizeItemByUserId(@Param("userId") Long userId, @Param("type") Type type,
			@Param("sourceCode") String sourceCode);

	int writeBackCount(@Param("prizeItem") PrizeItem prizeItem, @Param("userId") Long userId,
			@Param("sourceCode") String sourceCode);

	Boolean isExistPrize(@Param("prizeItem") PrizeItem prizeItem, @Param("userId") Long userId,
			@Param("sourceCode") String sourceCode);

}
